package com.javaoop.m3.p;

/**
 * 课程：JavaOOP ，山西应用科技学院信息工程学院计算机科学与技术专业 2201班
 *
 * @author by 2022010101张三
 * @user Administrator
 * @Date 2024/12/6 19:53
 * @Description 任务或用途 TODO:
 */
public class Coordinate {
    private int x;
    private int y;
    private char c;

    public Coordinate(int x, int y, char c) {
        this.x = x;
        this.y = y;
        this.c = c;
    }
    public void setXYC(int x, int y, char c) {
        this.x = x;
        this.y = y;
        this.c = c;
    }
    @Override
    public String toString() {
        return "坐标{" + "x=" + x +
                ", y=" + y + ", c=" + c +  '}';
    }

    public static void main(String[] args) {
        System.out.println("====== 坐标类 ======");
        Coordinate c=new Coordinate(3,4,'x');
        System.out.println(c);
        System.out.printf("x=%d y=%d c=%s",c.x,c.y,c.c);
        c.x=9;

    }
}
